


**************** use "Computational Model Replication Data.dta" ***************
*** findit stripplot
*** generate variables
generate regime = 4 if Selectorate == 0.02
replace regime = 3 if Selectorate == 1 & WinningCoalition == 0.01
replace regime = 2 if regime == .
replace regime = 1 if propDem == 1 & PropMajoritarian == 1
generate factorelectoral = 1 if PropMajoritarian == 0
replace factorelectoral = 2 if PropMajoritarian == 1
gen NoIrredentism = 1 if sumirredentism == 0
replace NoIrredentism = 0 if NoIrredentism == .

** Electoral Identifiers

*     1 - Proportional
*     2 - Majoritarian
 
*  Regime Identifier: 
*      4 - Military Dictatorship; Selectorate 0.02, WC 0.01
*      3 - Single-Party Dictatorship; Selectorate 1, WC 0.01
*      2 - Proportional Electoral
*      1 - Majoritarian Electoral

** Appendix Figure 1: Irredentist Events Across Political Institutions
stripplot sumirredentism if sumirredentism < 20, scheme(s1mono) bar over(regime) stack yscale(reverse)
tab sumirredentism if regime == 1
tab sumirredentism if regime == 2
tab sumirredentism if regime == 3
tab sumirredentism if regime == 4

sum sumirredentism if regime == 1 & sumirredentism < 20
sum sumirredentism if regime == 2 & sumirredentism < 20
sum sumirredentism if regime == 3 & sumirredentism < 20
sum sumirredentism if regime == 4 & sumirredentism < 20

** Appendix Figure 2: Predicted Irredentist Events per Model Run by Regime Type
nbreg sumirredentism i.regime if sumirredentism < 20
margins regime
marginsplot, scheme(s1mono) recast(scatter) horizontal yscale(reverse) title("") ytitle("") xtitle("Predicted Irredentist Events per Model Run") ylabel(1 "Majoritarian" 2 "Proportional" 3 "Party" 4 "Military/Personalist")

nbreg sumirredentism i.regime
margins regime


***** USE COMPUTATIONAL MODEL SENSITIVITY ANALYSIS DATA.dta *************
*** Appendix Figure 3: Graphical Results from Sensitivty Analysis

**14x14
nbreg sumirredentism ib2.regime if sumirredentism < 20 & fourteenby == 1
margins regime
pwcompare regime, pveffects irr
margins regime
marginsplot, scheme(s1mono) recast(scatter) horizontal yscale(reverse) title("841 Patches") ytitle("") xtitle("Predicted Irredentist Events per Model Run") ylabel(1 "Majoritarian" 2 "Proportional" 3 "Party" 4 "Military/Personalist")


** 18x18
nbreg sumirredentism ib2.regime if sumirredentism < 20 & eighteenby == 1
margins regime
pwcompare regime, pveffects irr
margins regime
marginsplot, scheme(s1mono) recast(scatter) horizontal yscale(reverse) title("1,369 Patches") ytitle("") xtitle("Predicted Irredentist Events per Model Run") ylabel(1 "Majoritarian" 2 "Proportional" 3 "Party" 4 "Military/Personalist")



** 100 Runs
nbreg sumirredentism ib2.regime if sumirredentism < 20 & Runs100 == 1
margins regime
pwcompare regime, pveffects irr
margins regime
marginsplot, scheme(s1mono) recast(scatter) horizontal yscale(reverse) title("100 Model Runs") ytitle("") xtitle("Predicted Irredentist Events per Model Run") ylabel(1 "Majoritarian" 2 "Proportional" 3 "Party" 4 "Military/Personalist")


** 250 Runs
nbreg sumirredentism ib2.regime if sumirredentism < 20 & Runs250 == 1
margins regime
pwcompare regime, pveffects irr
margins regime
marginsplot, scheme(s1mono) recast(scatter) horizontal yscale(reverse) title("250 Model Runs") ytitle("") xtitle("Predicted Irredentist Events per Model Run") ylabel(1 "Majoritarian" 2 "Proportional" 3 "Party" 4 "Military/Personalist")


** Dispersion 5
nbreg sumirredentism ib2.regime if sumirredentism < 20 & Dispersed5 == 1
margins regime
pwcompare regime, pveffects irr
margins regime
marginsplot, scheme(s1mono) recast(scatter) horizontal yscale(reverse) title("Dispersion = 5") ytitle("") xtitle("Predicted Irredentist Events per Model Run") ylabel(1 "Majoritarian" 2 "Proportional" 3 "Party" 4 "Military/Personalist")

** Dispersion 15
nbreg sumirredentism ib2.regime if sumirredentism < 20 & CulturalDrift15 == 1
margins regime
pwcompare regime, pveffects irr
margins regime
marginsplot, scheme(s1mono) recast(scatter) horizontal yscale(reverse) title("Dispersion = 15") ytitle("") xtitle("Predicted Irredentist Events per Model Run") ylabel(1 "Majoritarian" 2 "Proportional" 3 "Party" 4 "Military/Personalist")


*** Nations 8
nbreg sumirredentism ib2.regime if sumirredentism < 20 & Nations8 == 1
margins regime
pwcompare regime, pveffects irr
margins regime
marginsplot, scheme(s1mono) recast(scatter) horizontal yscale(reverse) title("Nations = 8") ytitle("") xtitle("Predicted Irredentist Events per Model Run") ylabel(1 "Majoritarian" 2 "Proportional" 3 "Party" 4 "Military/Personalist")


** Nations 12
nbreg sumirredentism ib2.regime if sumirredentism < 20 & Nations12 == 1
margins regime
pwcompare regime, pveffects irr
margins regime
marginsplot, scheme(s1mono) recast(scatter) horizontal yscale(reverse) title("Nations = 12") ytitle("") xtitle("Predicted Irredentist Events per Model Run") ylabel(1 "Majoritarian" 2 "Proportional" 3 "Party" 4 "Military/Personalist")


** In Nation 25
nbreg sumirredentism ib2.regime if sumirredentism < 20 & InNation25 == 1
margins regime
pwcompare regime, pveffects irr
margins regime
marginsplot, scheme(s1mono) recast(scatter) horizontal yscale(reverse) title("N Each Nation = 25") ytitle("") xtitle("Predicted Irredentist Events per Model Run") ylabel(1 "Majoritarian" 2 "Proportional" 3 "Party" 4 "Military/Personalist")

** In Nation 75
nbreg sumirredentism ib2.regime if sumirredentism < 20 & InNation75 == 1
margins regime
pwcompare regime, pveffects irr
margins regime
marginsplot, scheme(s1mono) recast(scatter) horizontal yscale(reverse) title("N Each Nation = 75") ytitle("") xtitle("Predicted Irredentist Events per Model Run") ylabel(1 "Majoritarian" 2 "Proportional" 3 "Party" 4 "Military/Personalist")


** T25P75
nbreg sumirredentism ib2.regime if sumirredentism < 20 & T25P75 == 1
margins regime
pwcompare regime, pveffects irr
margins regime
marginsplot, scheme(s1mono) recast(scatter) horizontal yscale(reverse) title("Transfers 25 / Public Goods 75") ytitle("") xtitle("Predicted Irredentist Events per Model Run") ylabel(1 "Majoritarian" 2 "Proportional" 3 "Party" 4 "Military/Personalist")


**T75P25
nbreg sumirredentism ib2.regime if sumirredentism < 20 & T75P25 == 1
margins regime
pwcompare regime, pveffects irr
margins regime
marginsplot, scheme(s1mono) recast(scatter) horizontal yscale(reverse) title("Transfers 75 / Public Goods 25") ytitle("") xtitle("Predicted Irredentist Events per Model Run") ylabel(1 "Majoritarian" 2 "Proportional" 3 "Party" 4 "Military/Personalist")


** HetPref 1.2
nbreg sumirredentism ib2.regime if sumirredentism < 20 & HETPREF1_2 == 1
margins regime
pwcompare regime, pveffects irr
margins regime
marginsplot, scheme(s1mono) recast(scatter) horizontal yscale(reverse) title("Heterogeneity of Preferences = 1.2") ytitle("") xtitle("Predicted Irredentist Events per Model Run") ylabel(1 "Majoritarian" 2 "Proportional" 3 "Party" 4 "Military/Personalist")


** HetPref 1.8
nbreg sumirredentism ib2.regime if sumirredentism < 20 & HetPref1_8 == 1
margins regime
pwcompare regime, pveffects irr
margins regime
marginsplot, scheme(s1mono) recast(scatter) horizontal yscale(reverse) title("Heterogeneity of Preferences = 1.8") ytitle("") xtitle("Predicted Irredentist Events per Model Run") ylabel(1 "Majoritarian" 2 "Proportional" 3 "Party" 4 "Military/Personalist")


** Nation HetPref 1.2
nbreg sumirredentism ib2.regime if sumirredentism < 20 & Nation1_2 == 1
margins regime
pwcompare regime, pveffects irr
margins regime
marginsplot, scheme(s1mono) recast(scatter) horizontal yscale(reverse) title("Nation Heterogeneity of Preferences = 1.2") ytitle("") xtitle("Predicted Irredentist Events per Model Run") ylabel(1 "Majoritarian" 2 "Proportional" 3 "Party" 4 "Military/Personalist")

** Nation HetPref 1.8
nbreg sumirredentism ib2.regime if sumirredentism < 20 & Nation1_8 == 1
margins regime
pwcompare regime, pveffects irr
margins regime
marginsplot, scheme(s1mono) recast(scatter) horizontal yscale(reverse) title("Nation Heterogeneity of Preferences = 1.8") ytitle("") xtitle("Predicted Irredentist Events per Model Run") ylabel(1 "Majoritarian" 2 "Proportional" 3 "Party" 4 "Military/Personalist")

**Distance Scale Correction 2
nbreg sumirredentism ib2.regime if sumirredentism < 20 & Distance_2 == 1
margins regime
pwcompare regime, pveffects irr
margins regime
marginsplot, scheme(s1mono) recast(scatter) horizontal yscale(reverse) title("Distance Scale Correction = 2") ytitle("") xtitle("Predicted Irredentist Events per Model Run") ylabel(1 "Majoritarian" 2 "Proportional" 3 "Party" 4 "Military/Personalist")


**Distance Scale Correction 8
nbreg sumirredentism ib2.regime if sumirredentism < 20 & Distance8 == 1
margins regime
pwcompare regime, pveffects irr
margins regime
marginsplot, scheme(s1mono) recast(scatter) horizontal yscale(reverse) title("Distance Scale Correction = 8") ytitle("") xtitle("Predicted Irredentist Events per Model Run") ylabel(1 "Majoritarian" 2 "Proportional" 3 "Party" 4 "Military/Personalist")


**PG200
nbreg sumirredentism ib2.regime if sumirredentism < 20 & publicgoodscalibrate == 200
margins regime
pwcompare regime, pveffects irr
margins regime
marginsplot, scheme(s1mono) recast(scatter) horizontal yscale(reverse) title("Public Goods / Transfer Scale Correction = 200") ytitle("") xtitle("Predicted Irredentist Events per Model Run") ylabel(1 "Majoritarian" 2 "Proportional" 3 "Party" 4 "Military/Personalist")


**PG600
nbreg sumirredentism ib2.regime if sumirredentism < 20 & publicgoodscalibrate == 600
margins regime
pwcompare regime, pveffects irr
margins regime
marginsplot, scheme(s1mono) recast(scatter) horizontal yscale(reverse) title("Public Goods / Transfer Scale Correction = 600") ytitle("") xtitle("Predicted Irredentist Events per Model Run") ylabel(1 "Majoritarian" 2 "Proportional" 3 "Party" 4 "Military/Personalist")

** Private25
nbreg sumirredentism ib2.regime if sumirredentism < 20 & Private25 == 1
margins regime
pwcompare regime, pveffects irr
margins regime
marginsplot, scheme(s1mono) recast(scatter) horizontal yscale(reverse) title("Starting Proportion of Private to Public 0.25") ytitle("") xtitle("Predicted Irredentist Events per Model Run") ylabel(1 "Majoritarian" 2 "Proportional" 3 "Party" 4 "Military/Personalist")


** Private75
nbreg sumirredentism ib2.regime if sumirredentism < 20 & Private75 == 1
margins regime
pwcompare regime, pveffects irr
margins regime
marginsplot, scheme(s1mono) recast(scatter) horizontal yscale(reverse) title("Starting Proportion of Private to Public 0.75") ytitle("") xtitle("Predicted Irredentist Events per Model Run") ylabel(1 "Majoritarian" 2 "Proportional" 3 "Party" 4 "Military/Personalist")


